package xaj.scc.ast;

import polyglot.ast.Ext;
import abc.aspectj.ast.AJAbstractExtFactory_c;

public abstract class SCAbstractExtFactory_c extends AJAbstractExtFactory_c
		implements SCExtFactory {
	private SCAbstractExtFactory_c nextExtFactory;

	protected SCAbstractExtFactory_c() {
		this(null);
	}

	protected SCAbstractExtFactory_c(SCAbstractExtFactory_c nextExtFactory) {
		super(nextExtFactory);
		this.nextExtFactory = nextExtFactory;
	}

	public final Ext extSyntaxClassDecl() {
		Ext e = extSyntaxClassDeclImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extSyntaxClassDecl();
			e = composeExts(e, e2);
		}
		return postExtSyntaxClassDecl(e);
	}

	protected Ext extSyntaxClassDeclImpl() {
		return extAJClassDeclImpl();
	}

	protected Ext postExtSyntaxClassDecl(Ext e) {
		return postExtAJClassDecl(e);
	}

	public final Ext extSyntaxClassBody() {
		Ext e = extSyntaxClassBodyImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extSyntaxClassBody();
			e = composeExts(e, e2);
		}
		return postExtSyntaxClassBody(e);
	}

	protected Ext extSyntaxClassBodyImpl() {
		return extAJClassBodyImpl();
	}

	protected Ext postExtSyntaxClassBody(Ext e) {
		return postExtAJClassBody(e);
	}

	public final Ext extNumberOfPasses() {
		Ext e = extNumberOfPassesImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extNumberOfPasses();
			e = composeExts(e, e2);
		}
		return postExtNumberOfPasses(e);
	}

	protected Ext extNumberOfPassesImpl() {
		return extNodeImpl();
	}

	protected Ext postExtNumberOfPasses(Ext e) {
		return postExtNode(e);
	}

	public final Ext extSyntaxDeclarationInsertion() {
		Ext e = extSyntaxDeclarationInsertionImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extSyntaxDeclarationInsertion();
			e = composeExts(e, e2);
		}
		return postExtSyntaxDeclarationInsertion(e);
	}

	protected Ext extSyntaxDeclarationInsertionImpl() {
		return extNodeImpl();
	}

	protected Ext postExtSyntaxDeclarationInsertion(Ext e) {
		return postExtNode(e);
	}

	public final Ext extSyntaxDeclarationOverrides() {
		Ext e = extSyntaxDeclarationOverridesImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extSyntaxDeclarationOverrides();
			e = composeExts(e, e2);
		}
		return postExtSyntaxDeclarationOverrides(e);
	}

	protected Ext extSyntaxDeclarationOverridesImpl() {
		return extNodeImpl();
	}

	protected Ext postExtSyntaxDeclarationOverrides(Ext e) {
		return postExtNode(e);
	}

	public final Ext extProduction() {
		Ext e = extProductionImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extProduction();
			e = composeExts(e, e2);
		}
		return postExtProduction(e);
	}

	protected Ext extProductionImpl() {
		return extNodeImpl();
	}

	protected Ext postExtProduction(Ext e) {
		return postExtNode(e);
	}

	public final Ext extProductionElement() {
		Ext e = extProductionElementImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extProductionElement();
			e = composeExts(e, e2);
		}
		return postExtProductionElement(e);
	}

	protected Ext extProductionElementImpl() {
		return extNodeImpl();
	}

	protected Ext postExtProductionElement(Ext e) {
		return postExtNode(e);
	}

	public final Ext extSimpleFactor() {
		Ext e = extSimpleFactorImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extSimpleFactor();
			e = composeExts(e, e2);
		}
		return postExtSimpleFactor(e);
	}

	protected Ext extSimpleFactorImpl() {
		return extNodeImpl();
	}

	protected Ext postExtSimpleFactor(Ext e) {
		return postExtNode(e);
	}

	public final Ext extStringFactor() {
		Ext e = extStringFactorImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extStringFactor();
			e = composeExts(e, e2);
		}
		return postExtStringFactor(e);
	}

	protected Ext extStringFactorImpl() {
		return extNodeImpl();
	}

	protected Ext postExtStringFactor(Ext e) {
		return postExtNode(e);
	}

	public final Ext extOptionalFactor() {
		Ext e = extOptionalFactorImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extOptionalFactor();
			e = composeExts(e, e2);
		}
		return postExtOptionalFactor(e);
	}

	protected Ext extOptionalFactorImpl() {
		return extNodeImpl();
	}

	protected Ext postExtOptionalFactor(Ext e) {
		return postExtNode(e);
	}

	public final Ext extClosureFactor() {
		Ext e = extClosureFactorImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extClosureFactor();
			e = composeExts(e, e2);
		}
		return postExtClosureFactor(e);
	}

	protected Ext extClosureFactorImpl() {
		return extNodeImpl();
	}

	protected Ext postExtClosureFactor(Ext e) {
		return postExtNode(e);
	}

	public final Ext extOrFactor() {
		Ext e = extOrFactorImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extOrFactor();
			e = composeExts(e, e2);
		}
		return postExtOrFactor(e);
	}

	protected Ext extOrFactorImpl() {
		return extNodeImpl();
	}

	protected Ext postExtOrFactor(Ext e) {
		return postExtNode(e);
	}
	
	public final Ext extConcatFactor() {
		Ext e = extConcatFactorImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extConcatFactor();
			e = composeExts(e, e2);
		}
		return postExtConcatFactor(e);
	}

	protected Ext extConcatFactorImpl() {
		return extNodeImpl();
	}

	protected Ext postExtConcatFactor(Ext e) {
		return postExtNode(e);
	}
	
	public final Ext extLambdaFactor(){
		Ext e = extLambdaFactorImpl();
		
		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extLambdaFactor();
			e = composeExts(e, e2);
		}
		
		return postExtLambdaFactor(e);
		
	}
	
	protected Ext extLambdaFactorImpl(){
		return extNodeImpl();
	}
	
	protected Ext postExtLambdaFactor(Ext e){
		return postExtNode(e);
	}
	public final Ext extNamedFactor() {
		Ext e = extNamedFactorImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extNamedFactor();
			e = composeExts(e, e2);
		}
		return postExtNamedFactor(e);
	}

	protected Ext extNamedFactorImpl() {
		return extNodeImpl();
	}

	protected Ext postExtNamedFactor(Ext e) {
		return postExtNode(e);
	}

	public final Ext extSemanticAction() {
		Ext e = extSemanticActionImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extSemanticAction();
			e = composeExts(e, e2);
		}
		return postExtSemanticAction(e);
	}

	protected Ext extSemanticActionImpl() {
		return extNodeImpl();
	}

	protected Ext postExtSemanticAction(Ext e) {
		return postExtNode(e);
	}

	public final Ext extImportSymbol() {
		Ext e = extImportSymbolImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extImportSymbol();
			e = composeExts(e, e2);
		}
		return postExtImportSymbol(e);
	}

	protected Ext extImportSymbolImpl() {
		return extImportImpl();
	}

	protected Ext postExtImportSymbol(Ext e) {
		return postExtImport(e);
	}

	public final Ext extImportSyntax() {
		Ext e = extImportSyntaxImpl();

		if (nextExtFactory != null) {
			Ext e2 = nextExtFactory.extImportSyntax();
			e = composeExts(e, e2);
		}
		return postExtImportSyntax(e);
	}

	protected Ext extImportSyntaxImpl() {
		return extImportImpl();
	}

	protected Ext postExtImportSyntax(Ext e) {
		return postExtImport(e);
	}
	
	/*public Ext extOnWeaving() {
		return extImportImpl();
	}*/

	// Retornar uma nova extensão

	/*protected Ext extNodeImpl() {
		return new SCExt_c();
	}

	protected Ext extSourceFileImpl() {
		return new SCExt_c();
	}*/
}
